//------------------------------------------------------------------------------
// <pcdd-entitiy>
//     系统管理业务类库
//     管理员日志业务对象
// </pcdd-entitiy>
//------------------------------------------------------------------------------

using CL.Enum.Common;
using CL.SystemInfo.DAL;
using CL.SystemInfo.Entity;
using System.Collections.Generic;

namespace CL.SystemInfo.BLL
{

    /// <summary>
    /// ManagerLogBLL 业务
    /// </summary>
    public class ManagerLogBLL
    {
        ManagerLogDAL dal = new ManagerLogDAL(DbConnectionEnum.CaileSystem);


        /// <summary>
        /// 插入对象
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int InsertEntity(ManagerLogEntity entity)
        {
            return dal.InsertEntity(entity);
        }
        /// <summary>
        /// 根据用户名返回上一次登录记录
        /// </summary>
        public ManagerLogEntity QueryEntity(string UserName, int top_num, string ActionType)
        {
            return dal.QueryEntity(UserName, top_num, ActionType);
        }
        /// <summary>
        /// 删除N天前的日志数据
        /// </summary>
        public int DeletedDay(int dayCount)
        {
            return dal.DeletedDay(dayCount);

        }
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public List<ManagerLogEntity> QueryListByPage(string strName, string orderby, int pageSize, int pageIndex, ref int recordCount)
        {
            return dal.QueryListByPage(strName, orderby, pageSize, pageIndex, ref recordCount);
        }
    }
}
